home *** CD-ROM | disk | FTP | other *** search
- property pSprite, spriteNum, pchar, ptilelist, ptilelist2, pquestionnum, pnorm, pselect, pdown, myques, plist2
- global gtiles, gblue, gsel, lasttile, currentscope
-
- on getPropertyDescriptionList me
- return [#ptilelist2: [#comment: "ppp", #format: #string, #default: "[]"]]
- end
-
- on beginSprite me
- pSprite = sprite(spriteNum)
- gtiles.add(pSprite)
- plist2 = ptilelist2.value
- init()
- if gtiles.count = (15 * 15) then
- createPuzzle()
- end if
- end
-
- on init me
- pnorm = pSprite.member
- pdown = member(pSprite.member.name & "1")
- pselect = member(pSprite.member.name & "2")
- end
-
- on mouseDown me
- end
-
- on moveit me, which
- if which = #left then
- pSprite.member = pselect
- if ptilelist.findPos(pSprite) > 1 then
- gsel = ptilelist[ptilelist.findPos(pSprite) - 1]
- else
- gsel = ptilelist[ptilelist.count]
- end if
- else
- if which = #right then
- pSprite.member = pselect
- if ptilelist.findPos(pSprite) < ptilelist.count then
- gsel = ptilelist[ptilelist.findPos(pSprite) + 1]
- else
- gsel = ptilelist[1]
- end if
- else
- if which = #up then
- pSprite.member = pselect
- if ptilelist2.findPos(pSprite) > 1 then
- gsel = ptilelist2[ptilelist2.findPos(pSprite) - 1]
- else
- gsel = ptilelist2[ptilelist2.count]
- end if
- else
- if which = #ldo then
- pSprite.member = pselect
- if ptilelist2.findPos(pSprite) < ptilelist2.count then
- gsel = ptilelist2[ptilelist2.findPos(pSprite) + 1]
- else
- gsel = ptilelist2[1]
- end if
- end if
- end if
- end if
- end if
- gsel.member = gsel.pdown
- end
-
- on proceed me
- if currentscope = #across then
- pSprite.member = pselect
- if ptilelist.findPos(pSprite) < ptilelist.count then
- gsel = ptilelist[ptilelist.findPos(pSprite) + 1]
- end if
- else
- pSprite.member = pselect
- if ptilelist2.findPos(pSprite) < ptilelist2.count then
- gsel = ptilelist2[ptilelist2.findPos(pSprite) + 1]
- end if
- end if
- gsel.member = gsel.pdown
- end
-